/**
 * @author ：FeatherWaves
 * @description：TODO
 * @date ：2021/9/1 19:24
 */
import javafx.util.converter.BigIntegerStringConverter;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
public class Fib {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        BigDecimal ret_ = scan.nextBigDecimal();
        String[] ret = ret_.toString().split("\\.", 2);
        int ret2_num = ret[1].length();
        long ret3 = 0;
        double ret4 = 0;
        for (int i = 0; i < ret[0].length(); i++) {
            ret3 += (ret[0].charAt(ret[0].length() - 1 - i) - '0') * (1 << i);
        }
        for (int j = 0; j < ret[1].length(); j++) {
            //double la = (2 >> (j+1));

            ret4 += (ret[1].charAt(j) - '0') * Math.pow(2, -j - 1);
        }
        double retL = ret3 + ret4;
        System.out.printf("%.8f\n", retL);
    }
}
